package com.mall.common;

import javax.servlet.http.Cookie;

public class SameSiteCookie extends Cookie {

    public SameSiteCookie(String name, String value) {
        super(name, value);
    }

    public SameSiteCookie(String name, String value, String path) {
        super(name, value);
        setPath(path);
    }

    public void setSameSite(String sameSite) {
        if (sameSite != null) {
            super.setComment(String.format("SameSite=%s", sameSite));
        }
    }
}